package com.imay.live.proto.helper;

/**
 * Created by jeaman on 2017/4/13.
 */

public class ProtoFactory {
    public static final int REQUEST_TYPE_SOCKET = 0;
    public static final int REQUEST_TYPE_HTTP = 1;

    public static final String COMMAND_PREFIX_SOCKET = "SOCK_SEND_";
    public static final String COMMAND_PREFIX_HTTP_GET = "HTTP_GET_";
    public static final String COMMAND_PREFIX_HTTP_POST = "HTTP_POST_";
    //下载type
    public static final int HTTP_TYPE_DOWNLOAD = 1;
    public static final int HTTP_TYPE_GET = 2;
    public static final int HTTP_TYPE_POST = 3;
    public static short sSeqId = 0;

    //生成唯一的seqId
    protected static short generateSeqId() {
        if (sSeqId == Short.MAX_VALUE) {
            sSeqId = 0;
        }
        return ++sSeqId;
    }
}
